<template>
	<view class="list">
		<view class="list_item" v-for="(item,index) in data" :key = "index" @click="navigatorTo(data,index)">
			<!-- <view class="imageview">
				<image class="coverImg" :src="item.coverImg" mode="scaleToFill"></image>
			</view> -->
			<view class="content">
				<view class="title">
					{{item.title}}
				</view>
				<view class="info">
					<text>分享人：{{item.shareUser}}</text>
					<text class="share-date">分类：{{item.chapterName}}</text>
					<text class="share-date">时间：{{item.niceDate}}</text>
					<view class="tag">
						<view class="tag-item" v-for="item1 in item.tags">
							{{item1.name}}
						</view>
					</view>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['data'],
		data() {
			return {
				
			}
		},
		methods: {
			navigatorTo(data,index){
				this.$emit('clickItem',data[index])
			}
		}
	}
</script>

<style lang="scss">
	.list{
		// display: flex;
		// justify-content: space-between;
		// flex-wrap: wrap;
		
		.list_item{
			// width: 355rpx;
			display: flex;
			align-items: center;
			padding: 10px;
			border-bottom: 1px solid #f6f6f6;
			.imageview{
				width: 120rpx;
				height: 120rpx;
				.coverImg{
					width: 120rpx;
					height: 120rpx;
				}
			}
			
			.content{
				padding: 5px 10px;
				
				.title{
					font-size: 30rpx;
				}
				.info{
					padding-top: 10px;
					font-size: 26rpx;
					.share-date{
						padding:20px;
					}
					.tag{
						display: flex;
						position: relative;
						font-size: 20rpx;
						.tag-item{
							margin-left: 5rpx;
						}
					}
				}
			}
		}
	}
	
	
	
</style>
